package com.qimou.iems.controller;

import com.zhuozhengsoft.pageoffice.OpenModeType;
import com.zhuozhengsoft.pageoffice.PageOfficeCtrl;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * Created by Eric Xie on 2017/9/12 0012.
 */
@Controller
@RequestMapping("/page")
public class PageController {








    // 质量体系模块 开始

    @RequestMapping("/record/edit")
    public String qualityRecordEdit(){
        return "/quality-record/edit";
    }

    @RequestMapping("/record/save")
    public String qualityRecordSave(){
        return "/quality-record/save";
    }

    @RequestMapping("/record/list")
    public String qualityRecordList(){
        return "/quality-record/list";
    }

    @RequestMapping("/qualityCategory/list")
    public String qualityCategoryList(){
        return "/quality-create/list";
    }

    @RequestMapping("/qualityCategoryChild/list")
    public String qualityCategoryChildList(){
        return "/quality-create/list-two";
    }

    @RequestMapping("/qualityItem/list")
    public String qualityItemList(){
        return "/quality-item/list";
    }

    @RequestMapping("/qualityItem/save")
    public String qualityItemSave(){
        return "/quality-item/save";
    }

    @RequestMapping("/qualityItem/edit")
    public String qualityItemEdit(Integer id, Model model){
        model.addAttribute("id",id);
        return "/quality-item/edit";
    }

    // 质量体系模块 结束


    // 部门模块
    @RequestMapping("/department/list")
    public String departmentList(){
        return "/department/list";
    }


    /** 公司模块**/
    @RequestMapping("/company/list")
    public String companyList(){
        return "/company/list";
    }




    /********** 用户管理 ***********/
    @RequestMapping("/user/list")
    public String userList() {
        return "/user/list";
    }


    @RequestMapping("/user/save")
    public String userSave() {
        return "/user/save";
    }




    /********** 角色管理 ***********/
    @RequestMapping("/role/list")
    public String roleList() {
        return "/role/list";
    }

    @RequestMapping("/role/add")
    public String roleAdd() {
        return "/role/add";
    }
    /***************************/



    @RequestMapping("/login")
    public String loginPage() {
        return "login";
    }

    @RequestMapping("/index")
    public String indexPage() {
        return "index";
    }

    /**
     * 进入主页
     *
     * @return
     */
    @RequestMapping("/main")
    public String main() {
        return "main";
    }

    /**
     * 权限
     *
     * @return
     */
    @RequestMapping("/jurisdiction/add")
    public String jurisdiction() {
        return "/jurisdiction/add";
    }


    // 管理员管理

    @RequestMapping(value = "/adminUserList")
    public String adminUserList(){
        return "/admin-user/list";
    }
    @RequestMapping(value = "/adminUserSave")
    public String adminUserSave(){
        return "/admin-user/save";
    }

    @RequestMapping(value = "/adminUserUpdatePwd")
    public String adminUserUpdatePwd(){
        return "/admin-user/updatePassword";
    }




}
